<!--
 * @Description: 饮食的打卡动态详情
 * @Version: 1.0
 * @Author: Yuanjy
 * @Date: 2020-05-18 15:57:23
 * @LastEditors: Yuanjy
 * @LastEditTime: 2020-05-18 16:21:10
--> 
<template>
  <div style="margin: 0 20px 0;">
    <div>
      <el-radio-group v-model="type" size="mini">
        <el-radio-button label="全部"></el-radio-button>
        <el-radio-button label="一对一"></el-radio-button>
        <el-radio-button label="减脂营"></el-radio-button>
        <el-radio-button label="其他"></el-radio-button>
      </el-radio-group>
    </div>
    <div class="diet-box" style="">
      <div class="fl" style="width:50px">
        <img src="https://cache.tita.com/Image/388052/76f4bc16b0fb4861b8a2a8ac8f198d25_b.jpg" width="50px" style="border-radius: 50%">
      </div>
      <div class="fl" style="width:10px;height:50px" />
      <div class="fl" style="font-size:16px;width:90%">
        <span style="color:#eb3e3e"> 袁佳阳 </span> 的 早餐 打卡 &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #aaa;font-size:14px">2020-05-13 12:25:12</span>
        <div style="width:100%">
          <dietComment :diet-data="dietData" :meal-type="'breakfast'" :service-id="+serviceId" style="width:100%" @getDietInfo="getDietInfo" />
        </div>
      </div>
      <div style="float:right;font-size:12px;width:100%;text-align:right;padding:10px 0 5px;">
        <el-button type="text" style="font-size:12px;padding:0;" @click="showWeight(1)">体重趋势</el-button> 
          | <el-button type="text" style="font-size:12px;padding:0;margin-left:0;" @click="showWeight(1)">备注信息</el-button>
      </div>
    </div>
    <weight ref="weight" />
  </div>
</template>

<script>
import dietComment from '../punchModule/dietComment'
import weight from '../punchModule/weight'

export default {
  components: {
    dietComment, weight
  },
  data() {
    return {
      activeName: 'breakfast',
      dietData: {},
      mealType: 'breakfast',
      serviceId: 1,
      type: '',
      dietData: {
        "id":187859,
        "note":"",
        "time":"2020-05-18 08:55:22",
        "img":[{"url":"https:\/\/qiezi-source-1.oss-cn-shanghai.aliyuncs.com\/upload\/jz\/wxa\/diet\/291162\/20200518\/breakfast_1589763311.jpg","attach":"b+37VbSFVxX9mWebrpwR\/w=="}],
        "evaluate":"\u54b1\u4eec\u5fae\u4fe1\u6c9f\u901a\u54c8~",
        "score":0,
        "nutris":{"cereal":{"name":"\u8c37\u85af\u4e3b\u98df","elments":[{"label":"\u6ce1\u996d\uff0c"}]},"meat_category":{"name":"\u8c46\u5976\u86cb\u8089\u9c7c","elments":[]},"fruit_vegetable":{"name":"\u852c\u83dc\u6c34\u679c","elments":[]},"nuts":{"name":"\u575a\u679c\u96f6\u98df\u751c\u70b9","elments":[]},"fried_food":{"name":"\u6cb9\u70b8\u70e7\u70e4\u718f\u5236\u7b49","elments":[]},"toast_food":{"name":"\u9152\u6c34\u996e\u6599","elments":[]}},
        "drink_water":0,"is_meal_powder":0,
        "comment_list":[{"id":174294,"item_id":187859,"item_type":"breakfast","sender_id":25,"sender_name":"\u8425\u517b\u5e08Cherry","receiver_id":0,"head":"https:\/\/wwxapi.qiezilife.com\/upload\/wwxapi\/upload\/2020-05-14\/a3a802b55ecc4e2b594bc908cc4ee5b7.jpg","receiver_name":"","content":"\u54b1\u4eec\u5fae\u4fe1\u6c9f\u901a\u54c8~","type":0,"add_time":"2020-05-18 13:39:06"}]
      }
    }
  },
  created() {
    
  },
  methods: {
    handleClick() {
      
    },
    getDietInfo() {
      
    },
    showWeight(serviceId) {
      this.$refs['weight'].weightShow = true
      this.$refs['weight'].getWeightList(14, serviceId)
    }
  }
}
</script>

<style scoped>
.diet-box {
  padding:20px 20px 0;
  border-bottom:1px solid #ddd;
  width:100%;
  overflow: hidden;
}
</style>